﻿@model PostViewModel
@{
    ViewData["Title"] = Model.Title;
}

@section head {
    @* <link rel="stylesheet" href="~/lib/editormd/css/editormd.preview.min.css"> *@
    <link rel="stylesheet" href="~/lib/editormd/css/editormd.preview.css">
    <style>
        .post-content {
            padding: 0;
            font-size: 1.2em;
        }
    </style>
}

@await Html.PartialAsync("Widgets/BackToTop", new BackToTopViewModel {IsShowText = false})

<div class="container">
    <div class="row">
        <div class="col-lg-3">
            <div id="sidebar" class="p-3 sticky-lg-top">
                @* <h5>Table of Contents</h5> *@
                <div class="d-flex align-items-center pb-3 mb-3 link-dark text-decoration-none border-bottom">
                    <span class="bi me-2">
                        <i class="fa-solid fa-table-list fa-2xl"></i>
                    </span>
                    <span class="fs-5 fw-semibold">文章目录</span>
                </div>

                <div id="post-toc-container"></div>
            </div>
        </div>
        <div class="col-lg-9">
            <partial name="Widgets/PostHeader"/>
            
            <div id="post-markdown-content" class="post-content">
                <textarea id="append-test" style="display:none;">@Model.Content</textarea>
            </div>

            <partial name="Widgets/PostBottom"/>
        </div>
    </div>
</div>

@section bottom {
    <script src="~/lib/jquery/dist/jquery.min.js"></script>
    @* <script src="~/lib/editormd/examples/js/jquery.min.js"></script> *@
    <script src="~/js/bootstrap-treeview.js"></script>
    <script src="~/lib/editormd/lib/marked.min.js"></script>
    <script src="~/lib/editormd/lib/prettify.min.js"></script>

    <script src="~/lib/editormd/lib/raphael.min.js"></script>
    <script src="~/lib/editormd/lib/underscore.min.js"></script>
    <script src="~/lib/editormd/lib/sequence-diagram.min.js"></script>
    <script src="~/lib/editormd/lib/flowchart.min.js"></script>
    <script src="~/lib/editormd/lib/jquery.flowchart.min.js"></script>

    <script src="~/lib/editormd/editormd.js"></script>
    <script src="~/js/blog-post.js"></script>
    <script src="~/js/comment.js"></script>
}